#ifndef RIVIAFILEEXPORTERMGR_H
#define RIVIAFILEEXPORTERMGR_H

#include <QMap>

class RIVIAFileExporterBase;

class RIVIAFileExporterMgr
{
public:
    static RIVIAFileExporterMgr* getInstance();

public:
    void addExporter(const QString& strFileType, RIVIAFileExporterBase* pExporter);
    RIVIAFileExporterBase* getExporter(const QString& strFileType);
private:
    RIVIAFileExporterMgr();
    ~RIVIAFileExporterMgr();

private:
    QMap<QString, RIVIAFileExporterBase*> m_oExportermap;
};

#define RIVIA_REGISTER_EXPORTER(exporter, FileType)  \
class exporter##Factory                                      \
{                                                                                                     \
public:                                                                                               \
    exporter##Factory(){RIVIAFileExporterMgr::getInstance()->addExporter(#FileType, new exporter());}     \
}; \
static exporter##Factory g_##exporter##strategyInstance;

#endif // RIVIAFILEEXPORTERMGR_H
